﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Forget.HRBLL.Logical;

namespace HRWebSite.Sys
{
    public partial class EditDict : BasePage
    {
        protected override void Page_Load(object sender, EventArgs e)
        {
            this.HRLimits = Limits.DictManage;
            this.HRLimitAttribute = Forget.HRBLL.LimitAttribute.Read | Forget.HRBLL.LimitAttribute.Modify;
            base.Page_Load(sender, e);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (DictLogical.AddDict(this.TextBox1.Text, int.Parse(this.DropDownList1.SelectedValue), 0))
            {                
                this.GridView1.DataBind();
            }
            else
                Response.Write("<script>alert('添加失败');</script>");
        }
    }
}